from django.urls import path, re_path
from django.views.generic import TemplateView

from . import views

urlpatterns = [
    # 注册模块
    re_path('^register/', TemplateView.as_view(template_name='register.html')),
    # 登陆界面
    re_path('^login/', TemplateView.as_view(template_name='login.html')),
    # 注册
    re_path('^check_username/', views.check_username),
    # 获取验证码
    re_path('^generate_codee/', views.generate_codee),
    # 判断验证码
    re_path('^verify_code/', views.verify_code),
    # 立即注册
    re_path('^submit_register/', views.submit_register),
    # 登陆函数
    re_path('^submit_login/', views.submit_login),
    # 我关注的列表
    re_path('^my_focus/', views.my_focus),
    # 博客列表
    re_path('^list_user/', views.UserListView.as_view()),
    # 关注函数
    re_path('^add_focus/', views.add_focus),
    # 用户修改数据
    re_path('^user_info/', views.UserInfoView.as_view()),
    # 取消关注
    re_path('^delete_focus/', views.delete_focus),
    # 退出登陆
    re_path('^logout/', views.logout),

]
